// components/item/index.js
import base from '../../api/base'
import {
  toast
} from '../../utils/util';
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    isDelete: {
      type: Boolean,
      value: false
    },
    index: {
      type: String
    },
    info: {
      type: Object,
      value: {
        url: ''
      }
    },
    enterprise: {
      type: String,
      value: ''
    },
    distance: {
      type: Number,
      value: 0
    }
  },
  // 生命周期
  lifetimes: {
    ready() {
      console.log(this.properties.info)
    },
    attached() {}
  },

  /**
   * 组件的初始数据
   */
  data: {
    base: base.pro
  },

  /**
   * 组件的方法列表
   */
  methods: {
    bindDelete() {
      this.triggerEvent('delete', 1)
    }
  }
})